home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Utilities ƒ / MPW Tools ƒ / Simula4.07 / Simula 4.07ƒ / Scripts / sim next >
Encoding:
Text File  |  1989-03-08  |  825 b   |  44 lines  |  [TEXT/EDIT]

  1. set exit 0
  2. set sources ""
  3. set options ""
  4. set linkfiles ""
  5. set main ""
  6.  
  7. for i in {parameters}
  8.     if "{i}" =~ /-≈/
  9.         set options "{options} {i}"
  10.     else if "{i}" =~ /≈ ≈/
  11.         echo Simula can∂'t handle blanks in sourcefile names: ∂""{1}"∂" not compiled
  12.  
  13.     else
  14.         set sources "{i} {sources}"
  15.         if {main} != "" 
  16.             set linkfiles "{linkfiles} {i}.sim.o"
  17.         else
  18.             set main "{i}"
  19.         end if
  20.     end if
  21.  
  22. end for
  23. for i in {sources}
  24.     "simula" -p {options} -n -s {i}
  25.     exit if {status}
  26.     setfile -t TEXT -c 'MPS ' {i}.atr
  27.     setfile -t TEXT -c 'MPS ' {i}.a
  28.     echo assembling: {i}.a
  29.     asm -wb {i}.a -o {i}.sim.o
  30. end for
  31.  
  32. echo -n "Iinking {main} "
  33. if "{linkfiles}" <> 0
  34.     echo with: {linkfiles}
  35. else
  36.     echo
  37. end if
  38.  
  39. Link  -w -t MPST -c 'MPS '  ∂
  40.     {main}.sim.o {linkfiles} ∂
  41.     {libraries}simrtslib ∂
  42.     {libraries}runtime.o ∂
  43.     {libraries}interface.o ∂
  44.     -o {main}